<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../../static/bootstrap/css/bootstrap.min.css"
	rel="stylesheet">
<link rel="stylesheet" href="../../static/css/sb-admin-2.css">
<link href="../../static/prettify/github-v2.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
      <script src="../../static/js/html5shiv.min.js"></script>
      <script src="../../static/js/respond.min.js"></script>
    <![endif]-->
<style>
body {
	word-wrap: break-word;
}
</style>
</head>
<body onload="prettyPrint();">
	<div id="nav"></div>
	<div id="page-wrapper" style="padding: 10px">
		<div class="container-fluid">
			<div class="row">
				<div class="col-md-12">

					<ol class="breadcrumb">
						<li><a href="../tag.html">标签</a></li>
						<li><a href="index.html">数据标签</a></li>
						<li><a href="files.html">文件查询标签</a></li>
					</ol>

					<h2>文件查询标签</h2>
					<h3>默认dataName</h3>
					<p>filePage</p>
					<h3>可接受的标签属性</h3>
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>属性名</th>
									<th class="col-md-3">类型</th>
									<th>是否必须</th>
									<th>默认</th>
									<th class="col-md-6">说明</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>path</td>
									<td>String</td>
									<td>否</td>
									<td></td>
									<td>文件路径，例如path为/a/b/c则查询c目录下的文件</td>
								</tr>

								<tr>
									<td>pageSize</td>
									<td>Integer</td>
									<td>否</td>
									<td>10</td>
									<td>分页数目，不会超过设置的最大分页数目</td>
								</tr>
								<tr>
									<td>currentPage</td>
									<td>int</td>
									<td>否</td>
									<td>1</td>
									<td>当前页码</td>
								</tr>
								<tr>
									<td>extensions</td>
									<td>String</td>
									<td>否</td>
									<td></td>
									<td>文件后缀，如果只需要查询图片文件，那么这个值应该为jpg,jpeg,png,gif(不同后缀用','号分隔)，不填为查询所有</td>
								</tr>
								<tr>
									<td>type</td>
									<td>enum</td>
									<td>否</td>
									<td></td>
									<td>文件类型，DIRECTORY(文件夹),FILE(文件)</td>
								</tr>
								<tr>
									<td>fileName</td>
									<td>String</td>
									<td>否</td>
									<td></td>
									<td>文件名称</td>
								</tr>
								<tr>
									<td>ignorePaging</td>
									<td>boolean</td>
									<td>否</td>
									<td>false</td>
									<td>是否忽视分页，查询全部文件</td>
								</tr>
							</tbody>
						</table>
					</div>
					<h3>结果返回</h3>
					<p>
						无论是否查询到结果，都将会返回一个不为null的PageResult&lt;BlogFile&gt;对象，该对象基础可访问属性请见<a
							href="../appendix.html#pageresult-pros" target="_blank">PageResult默认属性</a>，
					</p>
					<p>BlogFile可访问属性如下：</p>
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>属性名</th>
									<th class="col-md-3">类型</th>
									<th>是否可能为null</th>
									<th class="col-md-6">说明</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>id</td>
									<td>Integer</td>
									<td>否</td>
									<td>文件ID</td>
								</tr>
								<tr>
									<td>type</td>
									<td>enum</td>
									<td>否</td>
									<td>FILE(文件)|DIRECTORY(文件夹)</td>
								</tr>
								<tr>
									<td>path</td>
									<td>String</td>
									<td>否</td>
									<td>路径，<b>该路径并不是完整的路径，如果当前指向一个文件，完成路径为/a/b/c/d.jpg，那么这里的path为d.jpg</b></td>
								</tr>
								<tr>
									<td>createDate</td>
									<td>Timestamp</td>
									<td>否</td>
									<td>文件创建日期</td>
								</tr>
								<tr>
									<td>cf</td>
									<td>CommonFile</td>
									<td>是</td>
									<td>如果为文件夹，则为null，<a data-toggle="modal"
										data-target="#cfModal" href="###">查看CommonFile可供访问属性</a></td>
								</tr>
							</tbody>
						</table>
					</div>

				</div>
			</div>
		</div>
	</div>

	<div class="modal" id="cfModal" tabindex="-1" role="dialog"
		aria-labelledby="cfModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="cfModalLabel">CommonFile属性</h4>
				</div>
				<div class="modal-body">

					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>属性名</th>
									<th class="col-md-3">类型</th>
									<th>是否可能为null</th>
									<th class="col-md-4">说明</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>id</td>
									<td>Integer</td>
									<td>否</td>
									<td>文件ID</td>
								</tr>
								<tr>
									<td>size</td>
									<td>long</td>
									<td>否</td>
									<td>文件大小(字节)</td>
								</tr>
								<tr>
									<td>extension</td>
									<td>String</td>
									<td>否</td>
									<td>文件后缀</td>
								</tr>
								<tr>
									<td>originalFilename</td>
									<td>String</td>
									<td>否</td>
									<td>原始文件名</td>
								</tr>
								<tr>
									<td>width</td>
									<td>Integer</td>
									<td>是</td>
									<td>宽，图片文件特有属性，其他文件该属性为null</td>
								</tr>
								<tr>
									<td>height</td>
									<td>Integer</td>
									<td>是</td>
									<td>高，图片文件特有属性，其他文件该属性为null</td>
								</tr>

								<tr>
									<td>thumbnailUrl</td>
									<td>ThumbnailUrl</td>
									<td>是</td>
									<td>缩略图访问地址，图片文件特有属性，<a id="thumbLink" href="###">查看ThumnailUrl可供访问属性</a></td>
								</tr>

								<tr>
									<td>url</td>
									<td>String</td>
									<td>否</td>
									<td>文件访问地址</td>
								</tr>

								<tr>
									<td>downloadUrl</td>
									<td>String</td>
									<td>否</td>
									<td>文件下载地址</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				</div>
			</div>
		</div>
	</div>


	<div class="modal" id="thumbModal" tabindex="-1" role="dialog"
		aria-labelledby="thumbModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="thumbModalLabel">Thumbnail属性</h4>
				</div>
				<div class="modal-body">
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>属性名</th>
									<th class="col-md-3">类型</th>
									<th>是否可能为null</th>
									<th class="col-md-4">说明</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>small</td>
									<td>String</td>
									<td>否</td>
									<td>小尺寸图片访问地址</td>
								</tr>
								<tr>
									<td>middle</td>
									<td>String</td>
									<td>否</td>
									<td>中等尺寸图片访问地址</td>
								</tr>
								<tr>
									<td>large</td>
									<td>String</td>
									<td>否</td>
									<td>大尺寸图片访问地址</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				</div>
			</div>
		</div>
	</div>
</body>

<script type="text/javascript" src="../../static/jquery/jquery.min.js"></script>
<script type="text/javascript"
	src="../../static/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../static/prettify/prettify.js"></script>
<script>
	$(function() {
		$("#nav").load("dataTagNav.html");

		$("#thumbLink").click(function() {
			$("#cfModal").modal('hide');
			$("#thumbModal").modal('show');
		})

	});
</script>
</html>
